﻿package Cain.game.clickFun.clickMc 
{
	import flash.display.Sprite;
	import flash.events.Event;
	import Cain.Bit.Balloon;
	import flash.events.MouseEvent;
	/**
	 * 氣球物件
	 * @author Cain
	 */
	public class BalloonMC extends Balloon {
		private var up_v:Number;
		private var offset:Number;
		/**
		 * 氣球物件
		 * @param	_up_v 初速
		 * @param	_offset 左右偏移
		 */
		public function BalloonMC(_name:String,_up_v:Number=1,_offset:Number=1)
		{
			up_v = _up_v;
			offset = _offset;
			super(_name,0,offset);
			setup();
		}
		
		private function setup():void
		{
			this._vy = -up_v;
			addEventListener(Event.ADDED_TO_STAGE, addthis);
		}
		
		private function addthis(e:Event):void 
		{
			removeEventListener(Event.ADDED_TO_STAGE, addthis);
			addEventListener(Event.REMOVED_FROM_STAGE, renovethis);
			init();
			addEventListeners();
		}
		
		private function addEventListeners():void
		{
			
		}
		
		
		private function init():void
		{
			
		}
		
		private function renovethis(e:Event):void 
		{
			removeEventListener(Event.REMOVED_FROM_STAGE, renovethis);
		}
		
		public function play():void 
		{
			
		}
	}
	
}